To provide a more granular view of the data underlying the regression
analysis, the figure below traces the temporal evolution of the three
main explanatory variables—migration rate, unemployment rate, and
investment rate—for ten representative EU economies. The selection spans
core Western European economies (Germany, France, Netherlands), Southern
European states (Spain, Italy, Portugal, Greece), Northern Europe
(Sweden), Central-Eastern Europe (Poland), and a high-growth outlier
(Ireland). This diversity captures the heterogeneity in economic
structures and trajectories that motivates the panel data approach.
# Select representative countries across EU regions
selected_countries <- c("DE", "FR", "ES", "IT", "PL", "NL", "PT", "SE", "EL", "IE")
selected_names <- c(
"DE" = "Germany", "FR" = "France", "ES" = "Spain", "IT" = "Italy",
"PL" = "Poland", "NL" = "Netherlands", "PT" = "Portugal", "SE" = "Sweden",
"EL" = "Greece", "IE" = "Ireland"
)
# Prepare data for plotting - use GDP growth rate (%) for consistency with Figure 7.1
evolution_data <- panel_data %>%
filter(geo %in% selected_countries) %>%
mutate(country_label = selected_names[geo]) %>%
select(country_label, time, migration_rate, unemployment_rate, investment_rate, gdp_pc_growth)
# Separate data for explanatory variables
expl_vars_data <- evolution_data %>%
select(country_label, time, migration_rate, unemployment_rate, investment_rate) %>%
pivot_longer(
cols = c(migration_rate, unemployment_rate, investment_rate),
names_to = "Variable",
values_to = "Value"
) %>%
mutate(
Variable = case_when(
Variable == "migration_rate" ~ "Migration Rate (per 1,000)",
Variable == "unemployment_rate" ~ "Unemployment Rate (%)",
Variable == "investment_rate" ~ "Investment Rate (% of GDP)"
),
Variable = factor(Variable, levels = c(
"Migration Rate (per 1,000)",
"Unemployment Rate (%)",
"Investment Rate (% of GDP)"
))
)
# GDP growth data for secondary axis
gdp_data <- evolution_data %>%
select(country_label, time, gdp_pc_growth)
# Scaling for secondary axis: GDP growth typically ranges from -15 to +25
# Map to similar range as other variables (~0-30)
gdp_scale_factor <- 1 # GDP growth is already in percentage points, similar scale
gdp_shift <- 0 # No shift needed
# Create faceted line plot with dual axis
ggplot() +
# Explanatory variables (left axis)
geom_line(data = expl_vars_data,
aes(x = time, y = Value, color = Variable, linetype = Variable),
linewidth = 1) +
geom_point(data = expl_vars_data,
aes(x = time, y = Value, color = Variable),
size = 2, alpha = 0.8) +
# GDP growth (right axis)
geom_line(data = gdp_data,
aes(x = time, y = gdp_pc_growth),
color = "#7B3294", linewidth = 1.2, alpha = 0.8) +
geom_point(data = gdp_data,
aes(x = time, y = gdp_pc_growth),
color = "#7B3294", size = 2.5, shape = 17, alpha = 0.8) +
geom_hline(yintercept = 0, linetype = "dashed", color = "gray40", linewidth = 0.5) +
facet_wrap(~ country_label, ncol = 2, scales = "free_y") +
scale_x_continuous(breaks = seq(2014, 2023, 2)) +
scale_y_continuous(
name = "Value (Migration, Unemployment, Investment)",
sec.axis = sec_axis(
~ .,
name = "GDP per Capita Growth (%)"
)
) +
scale_color_manual(
values = c(
"Migration Rate (per 1,000)" = "#2166AC",
"Unemployment Rate (%)" = "#B2182B",
"Investment Rate (% of GDP)" = "#1B7837"
)
) +
scale_linetype_manual(
values = c(
"Migration Rate (per 1,000)" = "solid",
"Unemployment Rate (%)" = "dashed",
"Investment Rate (% of GDP)" = "dotted"
)
) +
labs(
title = "Evolution of Key Variables and GDP per Capita Growth (2014–2023)",
subtitle = "Selected EU economies | Purple triangles: GDP per capita growth (%, right axis)",
x = "Year",
color = "Explanatory Variables",
linetype = "Explanatory Variables"
) +
theme_minimal(base_size = 12) +
theme(
legend.position = "bottom",
legend.title = element_text(face = "bold"),
strip.text = element_text(face = "bold", size = 11),
plot.title = element_text(face = "bold"),
plot.subtitle = element_text(color = "gray40"),
panel.grid.minor = element_blank(),
axis.text.x = element_text(angle = 45, hjust = 1),
axis.title.y.right = element_text(color = "#7B3294", face = "bold"),
axis.text.y.right = element_text(color = "#7B3294")
) +
guides(
color = guide_legend(nrow = 1),
linetype = guide_legend(nrow = 1)
)
The figure reveals substantial cross-country heterogeneity in
variable levels and trajectories. The COVID-19 shock (2020) is visible
as a sharp GDP contraction followed by V-shaped recovery across all
countries. These differences in levels and dynamics motivate the use of
fixed effects to absorb time-invariant country characteristics.